//--------------------------------------------------------------------------------
// This file is a portion of the D2D1Renderer.  It is distributed
// under the MIT License, available in the root of this distribution and 
// at the following URL:
//
// http://www.opensource.org/licenses/mit-license.php
//
// Copyright (c) Mirco Timmermann
//
//--------------------------------------------------------------------------------
#pragma once

#ifndef _MOUSEEVENT_H
#define _MOUSEEVENT_H

#include "..\Event.h"


class MouseEvent : public Event {
public:
	static const int BUTTON1;
	static const int BUTTON2;
	static const int BUTTON3;
	static const int BUTTON4;
	static const int BUTTON5;
	static const int BUTTON6;
	static const int BUTTON7;
	static const int BUTTON8;

public:
	static const std::string DOUBLE_CLICK_;
	static const std::string MIDDLE_CLICK;
	static const std::string MIDDLE_MOUSE_DOWN;
	static const std::string MIDDLE_MOUSE_UP;
	static const std::string MOUSE_MOVE;
	static const std::string MOUSE_OUT;
	static const std::string MOUSE_OVER;
	
	static const std::string MOUSE_WHEEL_;
	static const std::string RIGHT_CLICK;
	static const std::string RIGHT_MOUSE_DOWN;
	static const std::string RIGHT_MOUSE_UP;
	static const std::string ROLL_OUT;
	static const std::string ROLL_OVER;

	///*
	//static const std::string CLICK;
	static const std::string MOUSE_DOWN;
	static const std::string MOUSE_UP;
	static const std::string MOUSE_LEAVE;
	static const std::string MOUSE_RAISE;
	static const std::string MOUSE_DRAG;
	//*/
	static const std::string FOCUS_LOST;

////////////
	static const std::string MOUSE_DOWN0;
	static const std::string MOUSE_UP0;
	static const std::string MOUSE_LEAVE0;
	static const std::string MOUSE_RAISE0;
	static const std::string MOUSE_DRAG0;

	static const std::string MOUSE_DOWN1;
	static const std::string MOUSE_UP1;
	static const std::string MOUSE_LEAVE1;
	static const std::string MOUSE_RAISE1;
	static const std::string MOUSE_DRAG1;

	static const std::string MOUSE_DOWN2;
	static const std::string MOUSE_UP2;
	static const std::string MOUSE_LEAVE2;
	static const std::string MOUSE_RAISE2;
	static const std::string MOUSE_DRAG2;

	static const std::string MOUSE_DOWN3;
	static const std::string MOUSE_UP3;
	static const std::string MOUSE_LEAVE3;
	static const std::string MOUSE_RAISE3;
	static const std::string MOUSE_DRAG3;

	static const std::string MOUSE_DOWN4;
	static const std::string MOUSE_UP4;
	static const std::string MOUSE_LEAVE4;
	static const std::string MOUSE_RAISE4;
	static const std::string MOUSE_DRAG4;

////////////
	int _stageX;
	int _stageY;

	int _distanceX;
	int _distanceY;

	int key;
	int wheelDelta;

	MouseEvent(const std::string &type, int stageX, int stageY, void* data = 0, bool bubbles = false, bool cancelable = false) : _stageX(stageX), _stageY(stageY), wheelDelta(0), Event(type, data, bubbles, cancelable) { 
		_distanceX = 0;
		_distanceY = 0;

		key = -1;
	}
};

#endif